package cn.tedu.lucky.draw.server.job.processor;

import cn.tedu.lucky.draw.server.protocol.po.Activity;
import org.springframework.batch.item.ItemProcessor;

import java.time.LocalDateTime;


public class ActivityExpirationProcessor implements ItemProcessor<Activity,Activity> {
    @Override
    public Activity process(Activity activity) throws Exception {
        activity.setStatus(3); //更新状态为已结束
        activity.setUpdateTime(LocalDateTime.now());
        return activity;
    }
}
